<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Example: File Manager Plugin - jWYSIWYG</title>
<link rel="stylesheet" type="text/css" href="../lib/blueprint/screen.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="../lib/blueprint/print.css" media="print" />
<!--[if lt IE 8]><link rel="stylesheet" href="../lib/blueprint/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<link rel="stylesheet" href="../../jquery.wysiwyg.css" type="text/css"/>
<link rel="stylesheet" href="../lib/ui/jquery.ui.all.css" type="text/css"/> 
<link rel="stylesheet" href="../lib/ui/jquery.ui.dialog.css" type="text/css"/> 
<link rel="stylesheet" href="../../plugins/fileManager/wysiwyg.fileManager.css" type="text/css"/> 
<script type="text/javascript" src="../lib/jquery.js"></script>
<script type="text/javascript" src="../lib/ui/jquery.ui.core.js"></script> 
<script type="text/javascript" src="../lib/ui/jquery.ui.widget.js"></script> 
<script type="text/javascript" src="../lib/ui/jquery.ui.position.js"></script> 
<script type="text/javascript" src="../lib/ui/jquery.ui.dialog.js"></script> 
<script type="text/javascript" src="../../jquery.wysiwyg.js"></script>
<script type="text/javascript" src="../../controls/wysiwyg.image.js"></script>
<script type="text/javascript" src="../../controls/wysiwyg.link.js"></script>
<script type="text/javascript" src="../../controls/wysiwyg.table.js"></script>
<script type="text/javascript" src="../../plugins/wysiwyg.fileManager.js"></script> 

<script type="text/javascript">
	(function($) {
		$(document).ready(function() {
			$("#wysiwyg").wysiwyg({
				controls: {
					"fileManager": { 
						visible: true,
						groupIndex: 12,
						tooltip: "File Manager",
						exec: function () {
							$.wysiwyg.fileManager.init(function (file) {
								file ? alert(file) : alert("No file selected.");
							});
						}
					}
				}
			});
			$.wysiwyg.fileManager.setAjaxHandler("http://localhost/cgi-bin/file_manager.pl");
			
		});
	})(jQuery);
</script>
</head>
<body><div class="container">
	<h1>jWYSIWYG</h1>
	<h2>Example: File Manager</h2>
	<textarea id="wysiwyg" rows="5" cols="80"></textarea>

	<hr/>
	<a href="index.html">Index</a>
</div></body>
</html>
